//
//  CLBaseViewController.h
//  chanlin
//
//  Created by Ryan on 14-11-1.
//  Copyright (c) 2014年 chanlin. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CLPushAnimated.h"
#import "IFToolBarViewController.h"
#import "InputView.h"
#import "MobClick.h"
#define TOOLBARHEIGH 44.0f


@interface CLBaseViewController : UIViewController<UIImagePickerControllerDelegate,UINavigationControllerDelegate>

@property (nonatomic,strong) UIView *preSnapShot;
//@property (nonatomic,unsafe_unretained) int pushType;
@property (nonatomic,strong)CLPushAnimated *dispatchObj;
@property (nonatomic,strong) NSString *itemId;
@property (nonatomic,strong) NSMutableDictionary *blocks;

@property (nonatomic,unsafe_unretained)BOOL isKeyBoradShow;

@property (nonatomic,strong)IFToolBarViewController *tool;

@property (nonatomic,weak) InputView *inputView;

@property (nonatomic,unsafe_unretained)BOOL isInputShow;
@property (nonatomic,unsafe_unretained)BOOL isShareShow;
@property (nonatomic,strong)UIActivityIndicatorView *theActive;
@property (nonatomic,strong)NSString *ctrlName;
- (BOOL)__shouldAutorotate;

- (NSUInteger)__supportedInterfaceOrientations;

//- (BOOL)__shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;

- (void)_showAlertWithTitle:(NSString *)title message:(NSString *)message block:(void(^)(int buttonIndex))block cancelButtonTitle:(NSString *)cancelButtonTitle button1:(NSString *)button1 button2:(NSString *)button2;

- (void)_showAlertWithTitle:(NSString *)title message:(NSString *)message block:(void(^)(int buttonIndex))block cancelButtonTitle:(NSString *)cancelButtonTitle confirmButtonTitles:(NSString *)confirmButtonTitles;

- (BOOL)showPopAction;

- (void)openComment:(NSString *)topicId replayId:(NSString *)replayId block:(void (^)(NSString *cont,int select))block;

- (IFToolBarViewController *)showToolbarWithType:(IFActive_ButtomToolBarButtonType) buttomToolBarButtonType;
- (IFToolBarViewController *)showSliderToolbarWithType:(IFActive_ButtomToolBarButtonType) buttomToolBarButtonType;

- (void)openShare:(NSDictionary *)dic;

- (void)startLoading;
- (void)stopLoading;

- (void)setOnlyItemId:(NSString *)itemId;

- (void)userSelectPicWithType:(UIImagePickerControllerSourceType)sourceType result:(void(^)(UIImage* image))block;
- (void)openComment:(NSString *)topicId comfirmPress:(void (^)(NSString *cont,int select))block;

- (void)openComment:(NSString *)topicId replayId:(NSString *)replayId backString:(NSString *) str block:(void (^)(BOOL success,NSString *commentId))block;
- (void)userSelectPicWithType2:(UIImagePickerControllerSourceType)sourceType result:(void(^)(UIImage* image))block;


@end
